package day3.HomeWork;

/**
 * ClassName：Account
 *
 * @Author：小鱼
 * @Create：2025-08-20 22:23
 */
public class Account{
    //账户名称
    private String name;
    //账户余额
    private double balance;

    public Account() {
    }

    public Account(String name, double balance) {
        this.name = name;
        this.balance = balance;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    // 增加余额
    public void increase(double amount) {
        balance += amount;
    }

    // 减少余额
    public void decrease(double amount) {
        balance -= amount;
    }
}
